package com.tg.demo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Life
 *
 * @author yuanjin
 * @date 2019/3/29
 */
@Entity
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Activity implements Serializable {
    private static final long serialVersionUID = 6925790014472235143L;
    private Integer id;
    private String activityName;
    private String activityInfo;
    private String ranging;
    private String createUser;
    private String createUserName;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    private Integer status;
    private Integer yn;
    private ActivityRecord record;
    private List<ActivityItem> items;

    private Integer recordId;
    private Integer itemId;
    private String explainInfo;
    /**
     * 是否已经参加过活动
     */
    private Integer isJoin;

    private String startTimeStr;
    private String endTimeStr;
}
